package org.dromara.knowledge.domain.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.knowledge.domain.KnowledgeRoleRelation;

/**
 * 知识库角色关系业务对象 knowledge_role_relation
 *
 * @author ruoyi
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = KnowledgeRoleRelation.class, reverseConvertGenerate = false)
public class KnowledgeRoleRelationBo extends BaseEntity {

    /**
     * 主键ID
     */
    @NotNull(message = "主键ID不能为空", groups = {EditGroup.class})
    private Long id;

    /**
     * 角色ID
     */
    @NotNull(message = "角色ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long roleId;

    /**
     * 分组ID
     */
    @NotNull(message = "分组ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long groupId;

    /**
     * 关系类型:1角色属于分组,2分组包含角色
     */
    private Integer relationType;

    /**
     * 关系状态:0禁用,1启用
     */
    private Integer status;

    /**
     * 排序
     */
    private Integer sort;

    /**
     * 备注
     */
    private String remark;

}